
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ page isErrorPage="true" %>
<h3>
Erreur sur le serveur
</h3>
<p>
${pageContext.errorData.throwable}
<c:choose>
  <c:when test="${!empty pageContext.errorData.throwable.cause}">
  : ${pageContext.errorData.throwable.cause}
  </c:when>
</c:choose>





<h1>Exception</h1> 
<div> 
<% 
Throwable th = pageContext.getException(); 
if(th != null) { 
   printRecursiveException(out,th); 
} 
%> 
</div> 

<%! 
public void printRecursiveException(JspWriter out, Throwable th) throws java.io.IOException { 
   out.println("<div>" + th.getClass().getName() + ":" + th.getMessage() + "</div>"); 
   StackTraceElement ste; 
   for(int x=0;x < th.getStackTrace().length;x++) { 
      out.println("<div>" + th.getStackTrace()[x].toString() + "</div>"); 
   } 
    
   Throwable parent = th.getCause(); 
   if(parent != null) {       
      out.println("<div class=\"parentCause\">"); 
      printRecursiveException(out,parent); 
      out.println("</div>"); 
   }    
} 
%> 


    <p>
	<c:url var="url" value="/index" />
        <a href="${url}">Retour </a>
    </p>

    


















